/////////////////////////////////////////////////////////////////////////////
// Name:        mainframe.h
// Purpose:     
// Author:      Julian Smart
// Modified by: 
// Created:     22/03/2009 10:28:01
// RCS-ID:      
// Copyright:   
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#ifndef _MAINFRAME_H_
#define _MAINFRAME_H_

/*!
 * Includes
 */

////@begin includes
#include "wx/frame.h"
////@end includes

#include "ax/ax_ui_adaptation.h"

/*!
 * Forward declarations
 */

////@begin forward declarations
class AxContainerCtrl;
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_SAMPLEMAINFRAME 2000
#define ID_GO_UP 2001
#define ID_GO_HOME 2003
#define ID_STOP_SPEECH 2002
#define ID_DESCRIBE_CONTEXT 2004
#define ID_DESCRIBE_ITEM 2005
#define ID_TEST_DIALOG 2006
#define ID_MESSAGE_DIALOG 2007
#define ID_LOG_DIALOG 2008
#define SYMBOL_SAMPLEMAINFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX
#define SYMBOL_SAMPLEMAINFRAME_TITLE _("Accessibility Framework Sample")
#define SYMBOL_SAMPLEMAINFRAME_IDNAME ID_SAMPLEMAINFRAME
#define SYMBOL_SAMPLEMAINFRAME_SIZE wxSize(800, 500)
#define SYMBOL_SAMPLEMAINFRAME_POSITION wxDefaultPosition
////@end control identifiers

// These are be defined in axsample.h

#undef ID_GO_UP
#undef ID_GO_HOME
#undef ID_STOP_SPEECH
#undef ID_DESCRIBE_CONTEXT
#undef ID_DESCRIBE_ITEM

/*!
 * SampleMainFrame class declaration
 */

class SampleMainFrame: public wxFrame
{    
    DECLARE_CLASS( SampleMainFrame )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    SampleMainFrame();
    SampleMainFrame( wxWindow* parent, wxWindowID id = SYMBOL_SAMPLEMAINFRAME_IDNAME, const wxString& caption = SYMBOL_SAMPLEMAINFRAME_TITLE, const wxPoint& pos = SYMBOL_SAMPLEMAINFRAME_POSITION, const wxSize& size = SYMBOL_SAMPLEMAINFRAME_SIZE, long style = SYMBOL_SAMPLEMAINFRAME_STYLE );

    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_SAMPLEMAINFRAME_IDNAME, const wxString& caption = SYMBOL_SAMPLEMAINFRAME_TITLE, const wxPoint& pos = SYMBOL_SAMPLEMAINFRAME_POSITION, const wxSize& size = SYMBOL_SAMPLEMAINFRAME_SIZE, long style = SYMBOL_SAMPLEMAINFRAME_STYLE );

    /// Destructor
    ~SampleMainFrame();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin SampleMainFrame event handler declarations

    /// wxEVT_CLOSE_WINDOW event handler for ID_SAMPLEMAINFRAME
    void OnCloseWindow( wxCloseEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_PREFERENCES
    void OnPreferencesClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for wxID_EXIT
    void OnExitClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_TEST_DIALOG
    void OnTestDialogClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MESSAGE_DIALOG
    void OnMessageDialogClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_LOG_DIALOG
    void OnLogDialogClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_STOP_SPEECH
    void OnStopSpeechClick( wxCommandEvent& event );

    /// wxEVT_UPDATE_UI event handler for ID_STOP_SPEECH
    void OnStopSpeechUpdate( wxUpdateUIEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GO_HOME
    void OnGoHomeClick( wxCommandEvent& event );

    /// wxEVT_UPDATE_UI event handler for ID_GO_HOME
    void OnGoHomeUpdate( wxUpdateUIEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GO_UP
    void OnGoUpClick( wxCommandEvent& event );

    /// wxEVT_UPDATE_UI event handler for ID_GO_UP
    void OnGoUpUpdate( wxUpdateUIEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DESCRIBE_CONTEXT
    void OnDescribeContextClick( wxCommandEvent& event );

    /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DESCRIBE_ITEM
    void OnDescribeItemClick( wxCommandEvent& event );

////@end SampleMainFrame event handler declarations

////@begin SampleMainFrame member function declarations

    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////@end SampleMainFrame member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();

////@begin SampleMainFrame member variables
    AxContainerCtrl* m_containerCtrl;
////@end SampleMainFrame member variables

    AxSelfVoicing m_adapter;
};

#endif
    // _MAINFRAME_H_
